<?php
	include_once $_SERVER["DOCUMENT_ROOT"].'/service/entite/role/RoleEntite.php';
	include_once $_SERVER["DOCUMENT_ROOT"].'/persistence/role/RoleDAO.php';

	class RoleService {
		
		private function RoleService() {
			//évite la construction
		}
		
		public static function createRole() {
			return new RoleEntite();
		}
		
		public static function getRoleForModification($id) {
			return RoleDAO::getRoleByID($id);
		}
		
		public static function supprimerRole($id) {
			return RoleDAO::delete($id);
		}
		
		public static function save(RoleEntite $roleEntite) {
			return RoleDAO::save($roleEntite);
		}
		
		public static function getListeRole() {
			return RoleDAO::getListeRole();
		}
	}
?>